Skip to content

refactor: clean up headless convergence args and config - #364

Merged
cebarks merged 1 commit into
mainfrom
headless-cleanup
Jul 30, 2026
Merged

refactor: clean up headless convergence args and config#364
cebarks merged 1 commit into
mainfrom
headless-cleanup

Conversation

@cebarks

@cebarks cebarks commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace long argument lists in converge(), ensure_clients(), remove_excess_clients(), and create_client_container() with a ConvergeContext struct, eliminating 3 clippy::too_many_arguments suppressions
  • Replace long argument lists in spawn_exit_watcher() and exit_watcher_loop() with an ExitWatcherCtx struct, eliminating 3 more suppressions (including a duplicate #[allow])
  • Fix ensure_fika_headless to write to mod_overlay() instead of headless_base, keeping the base headless install unmodified
  • Exit watchers now read restart_policy, max_restart_attempts, and restart_backoff_cap from config dynamically instead of caching at spawn time -- config changes take effect without supervisor restart
  • Remove unused _spt_version parameter from converge() public API
  • Net -55 lines

Test plan

  • cargo check passes
  • cargo clippy -- -D warnings passes (no too_many_arguments suppressions remain in src/client/)
  • cargo test -- all tests pass
  • Verified all 4 call sites updated (serve.rs, service.rs x3)

Implemented with the help of Claude Code

Replace long argument lists in convergence functions with ConvergeContext
struct, eliminating 6 clippy::too_many_arguments suppressions.

Fix ensure_fika_headless to write to mod_overlay() instead of
headless_base, keeping the base install directory unmodified and making
Fika.Headless visible through the standard overlay layering.

Exit watchers now read restart_policy, max_restart_attempts, and
restart_backoff_cap from config on each loop iteration instead of
caching them at spawn time. Config changes (e.g. switching restart
policy or adjusting backoff) take effect immediately without needing
to restart the supervisor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cebarks
cebarks merged commit 25e19e9 into main Jul 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant